/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistence;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author breinesg
 */
@Entity
@Table(name = "MUSIK_CD")
@XmlRootElement
@DiscriminatorValue("CD")
@NamedQueries({
    @NamedQuery(name = "MusikCd.findAll", query = "SELECT m FROM MusikCd m"),
    @NamedQuery(name = "MusikCd.findByInterpret", query = "SELECT m FROM MusikCd m WHERE m.interpret = :interpret"),
    @NamedQuery(name = "MusikCd.findByRecord", query = "SELECT m FROM MusikCd m WHERE m.record = :record")})
public class MusikCd extends Medium implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "INTERPRET")
    private String interpret;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "RECORD")
    private String record;

    public MusikCd() {
    }


    public String getInterpret() {
        return interpret;
    }

    public void setInterpret(String interpret) {
        this.interpret = interpret;
    }

    public String getRecord() {
        return record;
    }

    public void setRecord(String record) {
        this.record = record;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (mediumId != null ? mediumId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MusikCd)) {
            return false;
        }
        MusikCd other = (MusikCd) object;
        if ((this.mediumId == null && other.mediumId != null) || (this.mediumId != null && !this.mediumId.equals(other.mediumId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "persistence.MusikCd[ mediumId=" + mediumId + " ]";
    }
    
}
